package cn.sharefish.research;

import redis.clients.jedis.Jedis;

public class RedisClient {
    
    Jedis jedis = null;
    public void connect(){
        jedis = new Jedis("10.16.57.158", 6379);
        jedis.auth("123qwe");
    }
    
    public String set(String key, String val){
        return this.jedis.set(key, val);
    }
    
    public String get(String key){
        return this.jedis.get(key);
    }
    
    public static void main(String[] args) {
        RedisClient client = new RedisClient();
        client.connect();
        client.set("hello", "hello world 123");
        System.out.println(client.get("hello"));
    }
}
